<!DOCTYPE html>
<html>
<head>
    <!-- hexo-inject:begin --><!-- hexo-inject:end --><title>博望</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.css">
    <link href="https://cdn.staticfile.org/twitter-bootstrap/5.1.1/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.css">
    <script src="https://cdn.staticfile.org/twitter-bootstrap/5.1.1/js/bootstrap.bundle.min.js"></script>
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
    
<link rel="stylesheet" href="/css/prism.css">
 
    
<script src="/js/prism.js"></script>

    
    
<link rel="stylesheet" href="/css/index.css">
 
    
<script src="/js/search.js"></script>



     
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML" async></script>
        <script type="text/x-mathjax-config">
            MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
        </script>
     

     
        <script src="//lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.js"> </script>
        
<script src="/js/fancybox.js"></script>

    

    <script type="text/javascript">
        var search_path = "search.xml";
        if (search_path.length == 0) {
            search_path = "search.xml";
        }
        var path = "/" + search_path;
        searchFunc(path, 'local-search-input', 'local-search-result');
    </script>
<!-- hexo injector head_end start -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/themes/prism.css">
<!-- hexo injector head_end end --><meta name="generator" content="Hexo 6.1.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>

    <style>
        .row2 {
            /* --bs-gutter-x: 2.5rem;
            --bs-gutter-y: 0;
            display: flex;
            flex-wrap: wrap;
            margin-top: calc(var(--bs-gutter-y) * -20);
            margin-right: calc(var(--bs-gutter-x) * -2);
            margin-left: calc(var(--bs-gutter-x) * -2); */
        }

        .row-0 {
            width: 0;
        }
    </style>

    <body id="body">
        <!-- hexo-inject:begin --><!-- hexo-inject:end --><!-- 导航栏 -->
        <nav class="navbar navbar-expand-md navbar-dark mb-4 pt-3 pb-3">
    <div class="container" style="display: flex;flex-direction: row;align-items: flex-end;">
        <div style="display: flex;flex-direction: column;">
            <a class="navbar-brand" style='font: bold 29px "Times New Roman", Georgia, Times, sans-serif;
        color: #555;' href="/ ">
                博望
            </a>
            <span style="padding-bottom:7px;padding-right:20px">
                博望不熄
            </span>
        </div>

        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse"
            aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>

        <div class="collapse navbar-collapse" id="navbarCollapse">
            <ul class="navbar-nav me-auto mb-2 mb-md-0" style="color: #555;">
                
 
 

    <li class="nav-item">
        <a class="nav-link" style="color: #555;" href="/">
            <i class="fa fa-home "> </i> 主页
        </a>
    </li>

    <li class="nav-item">
        <a class="nav-link" style="color: #555;" href="/archives">
            <i class="fa fa-archive" "> </i> 归档
        </a>
    </li>
 

            </ul>

            
                <form class="d-flex">
                    <button class="btn text-muted fa fa-search d-none d-md-block d-lg-block" disabled></button>
                    <input id="local-search-input" class="form-control me-2 pe-4" type="search"
                        placeholder="搜索 " aria-label="Search">
                </form>
                

                    <ul class="navbar-nav">
                        
 

                    </ul>
        </div>
    </div>
</nav>

            <main class="container">
                <div class="row row2 pt-3">
                    <!-- 文章 -->
                    <div id="content" class="col-md-12">
                        <div class="markdown-section">
                            <!-- 搜索结果 -->
                            <div id="local-search-result"></div>
                            <!-- 博客详情 -->
<p class="h1">QuickJS操作码</p>

<div class="pb-3">
    <i class="fa fa-calendar p-1"></i>
    2022/05/05 10:32:43 

    <i class="fa fa-folder-open p-1"> </i> 
    <span class="tag-hover">
        
            <a href="/categories/QuickJS/ " class="link-dark text-decoration-none"> 
                QuickJS 
            </a>
         
    </span>

    <i class="fa fa-tag p-1"> </i>
    <span class="tag-hover">
        
            <a href="/tags/QuickJS/" class="link-dark text-decoration-none"> 
                QuickJS 
            </a>
        
    </span>
</div>

<h2 id="字节码"><a href="#字节码" class="headerlink" title="字节码"></a>字节码</h2><p>QuickJS执行JavaScript代码时，先将源码解析成字节码，然后再执行字节码。而字节码由操作码和操作数组成。操作码有点类似于汇编语言的指令，决定”CPU“执行何种操作。操作数就是操作码将要操作的数据。</p>
<h2 id="操作码的生成"><a href="#操作码的生成" class="headerlink" title="操作码的生成"></a>操作码的生成</h2><p>操作码在quickjs-opcode.h中定义。</p>
<pre class="line-numbers language-c" data-language="c"><code class="language-c"><span class="token comment">/*
 * QuickJS opcode definitions
 * 
 * Copyright (c) 2017-2018 Fabrice Bellard
 * Copyright (c) 2017-2018 Charlie Gordon
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */</span>

<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">ifdef</span> <span class="token expression">FMT</span></span>
<span class="token function">FMT</span><span class="token punctuation">(</span>none<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>none_int<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>none_loc<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>none_arg<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>none_var_ref<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>u8<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>i8<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>loc8<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>const8<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>label8<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>u16<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>i16<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>label16<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>npop<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>npopx<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>npop_u16<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>loc<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>arg<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>var_ref<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>u32<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>i32<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span><span class="token keyword">const</span><span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>label<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>atom<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>atom_u8<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>atom_u16<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>atom_label_u8<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>atom_label_u16<span class="token punctuation">)</span>
<span class="token function">FMT</span><span class="token punctuation">(</span>label_u16<span class="token punctuation">)</span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">undef</span> <span class="token expression">FMT</span></span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">endif</span> <span class="token comment">/* FMT */</span></span>

<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">ifdef</span> <span class="token expression">DEF</span></span>

<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">ifndef</span> <span class="token expression">def</span></span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">define</span> <span class="token macro-name function">def</span><span class="token expression"><span class="token punctuation">(</span>id<span class="token punctuation">,</span> size<span class="token punctuation">,</span> n_pop<span class="token punctuation">,</span> n_push<span class="token punctuation">,</span> f<span class="token punctuation">)</span> <span class="token function">DEF</span><span class="token punctuation">(</span>id<span class="token punctuation">,</span> size<span class="token punctuation">,</span> n_pop<span class="token punctuation">,</span> n_push<span class="token punctuation">,</span> f<span class="token punctuation">)</span></span></span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">endif</span></span>

<span class="token function">DEF</span><span class="token punctuation">(</span>invalid<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* never emitted */</span>

<span class="token comment">/* push values */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       push_i32<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> i32<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>     push_const<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token keyword">const</span><span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       fclosure<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token keyword">const</span><span class="token punctuation">)</span> <span class="token comment">/* must follow push_const */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>push_atom_value<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> atom<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span> private_symbol<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> atom<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>      undefined<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>           null<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>      push_this<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* only used at the start of a function */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>     push_false<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>      push_true<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>         object<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span> special_object<span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> u8<span class="token punctuation">)</span> <span class="token comment">/* only used at the start of a function */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>           rest<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> u16<span class="token punctuation">)</span> <span class="token comment">/* only used at the start of a function */</span>

<span class="token function">DEF</span><span class="token punctuation">(</span>           drop<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* a -> */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>            nip<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* a b -> b */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>           nip1<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* a b c -> b c */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>            dup<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* a -> a a */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>           dup1<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* a b -> a a b */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>           dup2<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* a b -> a b a b */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>           dup3<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">6</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* a b c -> a b c a b c */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>        insert2<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* obj a -> a obj a (dup_x1) */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>        insert3<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* obj prop a -> a obj prop a (dup_x2) */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>        insert4<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* this obj prop a -> a this obj prop a */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>          perm3<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* obj a b -> a obj b */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>          perm4<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* obj prop a b -> a obj prop b */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>          perm5<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* this obj prop a b -> a this obj prop b */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>           swap<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* a b -> b a */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>          swap2<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* a b c d -> c d a b */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>          rot3l<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* x a b -> a b x */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>          rot3r<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* a b x -> x a b */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>          rot4l<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* x a b c -> a b c x */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>          rot5l<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* x a b c d -> a b c d x */</span>

<span class="token function">DEF</span><span class="token punctuation">(</span>call_constructor<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> npop<span class="token punctuation">)</span> <span class="token comment">/* func new.target args -> ret. arguments are not counted in n_pop */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>           call<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> npop<span class="token punctuation">)</span> <span class="token comment">/* arguments are not counted in n_pop */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>      tail_call<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> npop<span class="token punctuation">)</span> <span class="token comment">/* arguments are not counted in n_pop */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>    call_method<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> npop<span class="token punctuation">)</span> <span class="token comment">/* arguments are not counted in n_pop */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>tail_call_method<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> npop<span class="token punctuation">)</span> <span class="token comment">/* arguments are not counted in n_pop */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>     array_from<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> npop<span class="token punctuation">)</span> <span class="token comment">/* arguments are not counted in n_pop */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>          apply<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> u16<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>         <span class="token keyword">return</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   return_undef<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>check_ctor_return<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>     check_ctor<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>    check_brand<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* this_obj func -> this_obj func */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>      add_brand<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* this_obj home_obj -> */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   return_async<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>          throw<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>    throw_error<span class="token punctuation">,</span> <span class="token number">6</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> atom_u8<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>           eval<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> npop_u16<span class="token punctuation">)</span> <span class="token comment">/* func args... -> ret_val */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>     apply_eval<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> u16<span class="token punctuation">)</span> <span class="token comment">/* func array -> ret_eval */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>         regexp<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* create a RegExp object from the pattern and a
                                       bytecode string */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>      get_super<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>         import<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* dynamic module import */</span>

<span class="token function">DEF</span><span class="token punctuation">(</span>      check_var<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> atom<span class="token punctuation">)</span> <span class="token comment">/* check if a variable exists */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>  get_var_undef<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> atom<span class="token punctuation">)</span> <span class="token comment">/* push undefined if the variable does not exist */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>        get_var<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> atom<span class="token punctuation">)</span> <span class="token comment">/* throw an exception if the variable does not exist */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>        put_var<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> atom<span class="token punctuation">)</span> <span class="token comment">/* must come after get_var */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   put_var_init<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> atom<span class="token punctuation">)</span> <span class="token comment">/* must come after put_var. Used to initialize a global lexical variable */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span> put_var_strict<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> atom<span class="token punctuation">)</span> <span class="token comment">/* for strict mode variable write */</span>

<span class="token function">DEF</span><span class="token punctuation">(</span>  get_ref_value<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>  put_ref_value<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>

<span class="token function">DEF</span><span class="token punctuation">(</span>     define_var<span class="token punctuation">,</span> <span class="token number">6</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> atom_u8<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>check_define_var<span class="token punctuation">,</span> <span class="token number">6</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> atom_u8<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>    define_func<span class="token punctuation">,</span> <span class="token number">6</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> atom_u8<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>      get_field<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> atom<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>     get_field2<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> atom<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>      put_field<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> atom<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span> get_private_field<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* obj prop -> value */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span> put_private_field<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* obj value prop -> */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>define_private_field<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* obj prop value -> obj */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   get_array_el<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>  get_array_el2<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* obj prop -> obj value */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   put_array_el<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>get_super_value<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* this obj prop -> value */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>put_super_value<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* this obj prop value -> */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   define_field<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> atom<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       set_name<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> atom<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>set_name_computed<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>      set_proto<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>set_home_object<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>define_array_el<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>         append<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* append enumerated object, update length */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>copy_data_properties<span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> u8<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>  define_method<span class="token punctuation">,</span> <span class="token number">6</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> atom_u8<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>define_method_computed<span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> u8<span class="token punctuation">)</span> <span class="token comment">/* must come after define_method */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   define_class<span class="token punctuation">,</span> <span class="token number">6</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> atom_u8<span class="token punctuation">)</span> <span class="token comment">/* parent ctor -> ctor proto */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   define_class_computed<span class="token punctuation">,</span> <span class="token number">6</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> atom_u8<span class="token punctuation">)</span> <span class="token comment">/* field_name parent ctor -> field_name ctor proto (class with computed name) */</span>

<span class="token function">DEF</span><span class="token punctuation">(</span>        get_loc<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> loc<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>        put_loc<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> loc<span class="token punctuation">)</span> <span class="token comment">/* must come after get_loc */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>        set_loc<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> loc<span class="token punctuation">)</span> <span class="token comment">/* must come after put_loc */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>        get_arg<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> arg<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>        put_arg<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> arg<span class="token punctuation">)</span> <span class="token comment">/* must come after get_arg */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>        set_arg<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> arg<span class="token punctuation">)</span> <span class="token comment">/* must come after put_arg */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>    get_var_ref<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> var_ref<span class="token punctuation">)</span> 
<span class="token function">DEF</span><span class="token punctuation">(</span>    put_var_ref<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> var_ref<span class="token punctuation">)</span> <span class="token comment">/* must come after get_var_ref */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>    set_var_ref<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> var_ref<span class="token punctuation">)</span> <span class="token comment">/* must come after put_var_ref */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>set_loc_uninitialized<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> loc<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>  get_loc_check<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> loc<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>  put_loc_check<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> loc<span class="token punctuation">)</span> <span class="token comment">/* must come after get_loc_check */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>  put_loc_check_init<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> loc<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>get_var_ref_check<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> var_ref<span class="token punctuation">)</span> 
<span class="token function">DEF</span><span class="token punctuation">(</span>put_var_ref_check<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> var_ref<span class="token punctuation">)</span> <span class="token comment">/* must come after get_var_ref_check */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>put_var_ref_check_init<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> var_ref<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>      close_loc<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> loc<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       if_false<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> label<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>        if_true<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> label<span class="token punctuation">)</span> <span class="token comment">/* must come after if_false */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>           <span class="token keyword">goto</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> label<span class="token punctuation">)</span> <span class="token comment">/* must come after if_true */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>          catch<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> label<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>          gosub<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> label<span class="token punctuation">)</span> <span class="token comment">/* used to execute the finally block */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>            ret<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> <span class="token comment">/* used to return from the finally block */</span>

<span class="token function">DEF</span><span class="token punctuation">(</span>      to_object<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token comment">//DEF(      to_string, 1, 1, 1, none)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>     to_propkey<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>    to_propkey2<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>

<span class="token function">DEF</span><span class="token punctuation">(</span>   with_get_var<span class="token punctuation">,</span> <span class="token number">10</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> atom_label_u8<span class="token punctuation">)</span>     <span class="token comment">/* must be in the same order as scope_xxx */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   with_put_var<span class="token punctuation">,</span> <span class="token number">10</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> atom_label_u8<span class="token punctuation">)</span>     <span class="token comment">/* must be in the same order as scope_xxx */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>with_delete_var<span class="token punctuation">,</span> <span class="token number">10</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> atom_label_u8<span class="token punctuation">)</span>     <span class="token comment">/* must be in the same order as scope_xxx */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>  with_make_ref<span class="token punctuation">,</span> <span class="token number">10</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> atom_label_u8<span class="token punctuation">)</span>     <span class="token comment">/* must be in the same order as scope_xxx */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   with_get_ref<span class="token punctuation">,</span> <span class="token number">10</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> atom_label_u8<span class="token punctuation">)</span>     <span class="token comment">/* must be in the same order as scope_xxx */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>with_get_ref_undef<span class="token punctuation">,</span> <span class="token number">10</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> atom_label_u8<span class="token punctuation">)</span>

<span class="token function">DEF</span><span class="token punctuation">(</span>   make_loc_ref<span class="token punctuation">,</span> <span class="token number">7</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> atom_u16<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   make_arg_ref<span class="token punctuation">,</span> <span class="token number">7</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> atom_u16<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>make_var_ref_ref<span class="token punctuation">,</span> <span class="token number">7</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> atom_u16<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   make_var_ref<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> atom<span class="token punctuation">)</span>

<span class="token function">DEF</span><span class="token punctuation">(</span>   for_in_start<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   for_of_start<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>for_await_of_start<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>    for_in_next<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>    for_of_next<span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> u8<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>iterator_check_object<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>iterator_get_value_done<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span> iterator_close<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>iterator_close_return<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>  iterator_next<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>  iterator_call<span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> u8<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>  initial_yield<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>          yield<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>     yield_star<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>async_yield_star<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>          await<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>

<span class="token comment">/* arithmetic/logic operations */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>            neg<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>           plus<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>            dec<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>            inc<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       post_dec<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       post_inc<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>        dec_loc<span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> loc8<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>        inc_loc<span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> loc8<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>        add_loc<span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> loc8<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>            not<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>           lnot<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>         <span class="token keyword">typeof</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>         delete<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>     delete_var<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> atom<span class="token punctuation">)</span>

<span class="token function">DEF</span><span class="token punctuation">(</span>            mul<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>            div<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>            mod<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>            add<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>            sub<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>            pow<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>            shl<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>            sar<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>            shr<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>             lt<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>            lte<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>             gt<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>            gte<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>     instanceof<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>             in<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>             eq<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>            neq<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>      strict_eq<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>     strict_neq<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>            and<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>            xor<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>             or<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>is_undefined_or_null<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">ifdef</span> <span class="token expression">CONFIG_BIGNUM</span></span>
<span class="token function">DEF</span><span class="token punctuation">(</span>      mul_pow10<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       math_mod<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">endif</span></span>
<span class="token comment">/* must be the last non short and non temporary opcode */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>            nop<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span> 

<span class="token comment">/* temporary opcodes: never emitted in the final bytecode */</span>

<span class="token function">def</span><span class="token punctuation">(</span>    enter_scope<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> u16<span class="token punctuation">)</span>  <span class="token comment">/* emitted in phase 1, removed in phase 2 */</span>
<span class="token function">def</span><span class="token punctuation">(</span>    leave_scope<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> u16<span class="token punctuation">)</span>  <span class="token comment">/* emitted in phase 1, removed in phase 2 */</span>

<span class="token function">def</span><span class="token punctuation">(</span>          label<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> label<span class="token punctuation">)</span> <span class="token comment">/* emitted in phase 1, removed in phase 3 */</span>

<span class="token function">def</span><span class="token punctuation">(</span>scope_get_var_undef<span class="token punctuation">,</span> <span class="token number">7</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> atom_u16<span class="token punctuation">)</span> <span class="token comment">/* emitted in phase 1, removed in phase 2 */</span>
<span class="token function">def</span><span class="token punctuation">(</span>  scope_get_var<span class="token punctuation">,</span> <span class="token number">7</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> atom_u16<span class="token punctuation">)</span> <span class="token comment">/* emitted in phase 1, removed in phase 2 */</span>
<span class="token function">def</span><span class="token punctuation">(</span>  scope_put_var<span class="token punctuation">,</span> <span class="token number">7</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> atom_u16<span class="token punctuation">)</span> <span class="token comment">/* emitted in phase 1, removed in phase 2 */</span>
<span class="token function">def</span><span class="token punctuation">(</span>scope_delete_var<span class="token punctuation">,</span> <span class="token number">7</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> atom_u16<span class="token punctuation">)</span> <span class="token comment">/* emitted in phase 1, removed in phase 2 */</span>
<span class="token function">def</span><span class="token punctuation">(</span> scope_make_ref<span class="token punctuation">,</span> <span class="token number">11</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> atom_label_u16<span class="token punctuation">)</span> <span class="token comment">/* emitted in phase 1, removed in phase 2 */</span>
<span class="token function">def</span><span class="token punctuation">(</span>  scope_get_ref<span class="token punctuation">,</span> <span class="token number">7</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> atom_u16<span class="token punctuation">)</span> <span class="token comment">/* emitted in phase 1, removed in phase 2 */</span>
<span class="token function">def</span><span class="token punctuation">(</span>scope_put_var_init<span class="token punctuation">,</span> <span class="token number">7</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> atom_u16<span class="token punctuation">)</span> <span class="token comment">/* emitted in phase 1, removed in phase 2 */</span>
<span class="token function">def</span><span class="token punctuation">(</span>scope_get_private_field<span class="token punctuation">,</span> <span class="token number">7</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> atom_u16<span class="token punctuation">)</span> <span class="token comment">/* obj -> value, emitted in phase 1, removed in phase 2 */</span>
<span class="token function">def</span><span class="token punctuation">(</span>scope_get_private_field2<span class="token punctuation">,</span> <span class="token number">7</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> atom_u16<span class="token punctuation">)</span> <span class="token comment">/* obj -> obj value, emitted in phase 1, removed in phase 2 */</span>
<span class="token function">def</span><span class="token punctuation">(</span>scope_put_private_field<span class="token punctuation">,</span> <span class="token number">7</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> atom_u16<span class="token punctuation">)</span> <span class="token comment">/* obj value ->, emitted in phase 1, removed in phase 2 */</span>

<span class="token function">def</span><span class="token punctuation">(</span> set_class_name<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> u32<span class="token punctuation">)</span> <span class="token comment">/* emitted in phase 1, removed in phase 2 */</span>
    
<span class="token function">def</span><span class="token punctuation">(</span>       line_num<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> u32<span class="token punctuation">)</span> <span class="token comment">/* emitted in phase 1, removed in phase 3 */</span>

<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">if</span> <span class="token expression">SHORT_OPCODES</span></span>
<span class="token function">DEF</span><span class="token punctuation">(</span>    push_minus1<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_int<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>         push_0<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_int<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>         push_1<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_int<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>         push_2<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_int<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>         push_3<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_int<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>         push_4<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_int<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>         push_5<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_int<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>         push_6<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_int<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>         push_7<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_int<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>        push_i8<span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> i8<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       push_i16<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> i16<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>    push_const8<span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> const8<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>      fclosure8<span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> const8<span class="token punctuation">)</span> <span class="token comment">/* must follow push_const8 */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>push_empty_string<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>

<span class="token function">DEF</span><span class="token punctuation">(</span>       get_loc8<span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> loc8<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       put_loc8<span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> loc8<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       set_loc8<span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> loc8<span class="token punctuation">)</span>

<span class="token function">DEF</span><span class="token punctuation">(</span>       get_loc0<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_loc<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       get_loc1<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_loc<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       get_loc2<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_loc<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       get_loc3<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_loc<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       put_loc0<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none_loc<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       put_loc1<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none_loc<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       put_loc2<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none_loc<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       put_loc3<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none_loc<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       set_loc0<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_loc<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       set_loc1<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_loc<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       set_loc2<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_loc<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       set_loc3<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_loc<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       get_arg0<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_arg<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       get_arg1<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_arg<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       get_arg2<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_arg<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       get_arg3<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_arg<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       put_arg0<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none_arg<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       put_arg1<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none_arg<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       put_arg2<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none_arg<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       put_arg3<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none_arg<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       set_arg0<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_arg<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       set_arg1<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_arg<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       set_arg2<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_arg<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       set_arg3<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_arg<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   get_var_ref0<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_var_ref<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   get_var_ref1<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_var_ref<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   get_var_ref2<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_var_ref<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   get_var_ref3<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_var_ref<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   put_var_ref0<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none_var_ref<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   put_var_ref1<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none_var_ref<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   put_var_ref2<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none_var_ref<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   put_var_ref3<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none_var_ref<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   set_var_ref0<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_var_ref<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   set_var_ref1<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_var_ref<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   set_var_ref2<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_var_ref<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>   set_var_ref3<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none_var_ref<span class="token punctuation">)</span>

<span class="token function">DEF</span><span class="token punctuation">(</span>     get_length<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>

<span class="token function">DEF</span><span class="token punctuation">(</span>      if_false8<span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> label8<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>       if_true8<span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> label8<span class="token punctuation">)</span> <span class="token comment">/* must come after if_false8 */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>          goto8<span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> label8<span class="token punctuation">)</span> <span class="token comment">/* must come after if_true8 */</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>         goto16<span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> label16<span class="token punctuation">)</span>

<span class="token function">DEF</span><span class="token punctuation">(</span>          call0<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> npopx<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>          call1<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> npopx<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>          call2<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> npopx<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>          call3<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> npopx<span class="token punctuation">)</span>

<span class="token function">DEF</span><span class="token punctuation">(</span>   is_undefined<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>        is_null<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span>typeof_is_undefined<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token function">DEF</span><span class="token punctuation">(</span> typeof_is_function<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">endif</span></span>

<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">undef</span> <span class="token expression">DEF</span></span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">undef</span> <span class="token expression">def</span></span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">endif</span>  <span class="token comment">/* DEF */</span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<p>只看这个文件，并不能很好的理解操作码是如何生成的。因为，这个文件中并未定义FMT和DEF宏定义。而QuickJS代码巧妙的使用了宏定义。通过更改宏定义的定义，实现同一份代码完成多个定义。这招叫做一鱼多吃，实在是妙。<br>字节码的定义在quickjs.c文件中。</p>
<pre class="line-numbers language-c" data-language="c"><code class="language-c"><span class="token keyword">typedef</span> <span class="token keyword">struct</span> <span class="token class-name">JSOpCode</span> <span class="token punctuation">&#123;</span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">ifdef</span> <span class="token expression">DUMP_BYTECODE</span></span>
    <span class="token keyword">const</span> <span class="token keyword">char</span> <span class="token operator">*</span>name<span class="token punctuation">;</span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">endif</span></span>
    <span class="token class-name">uint8_t</span> size<span class="token punctuation">;</span> <span class="token comment">/* in bytes */</span>
    <span class="token comment">/* the opcodes remove n_pop items from the top of the stack, then
       pushes n_push items */</span>
    <span class="token class-name">uint8_t</span> n_pop<span class="token punctuation">;</span>
    <span class="token class-name">uint8_t</span> n_push<span class="token punctuation">;</span>
    <span class="token class-name">uint8_t</span> fmt<span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span> JSOpCode<span class="token punctuation">;</span>

<span class="token keyword">static</span> <span class="token keyword">const</span> JSOpCode opcode_info<span class="token punctuation">[</span>OP_COUNT <span class="token operator">+</span> <span class="token punctuation">(</span>OP_TEMP_END <span class="token operator">-</span> OP_TEMP_START<span class="token punctuation">)</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token punctuation">&#123;</span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">define</span> <span class="token macro-name function">FMT</span><span class="token expression"><span class="token punctuation">(</span>f<span class="token punctuation">)</span></span></span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">ifdef</span> <span class="token expression">DUMP_BYTECODE</span></span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">define</span> <span class="token macro-name function">DEF</span><span class="token expression"><span class="token punctuation">(</span>id<span class="token punctuation">,</span> size<span class="token punctuation">,</span> n_pop<span class="token punctuation">,</span> n_push<span class="token punctuation">,</span> f<span class="token punctuation">)</span> <span class="token punctuation">&#123;</span> #id<span class="token punctuation">,</span> size<span class="token punctuation">,</span> n_pop<span class="token punctuation">,</span> n_push<span class="token punctuation">,</span> OP_FMT_ </span><span class="token punctuation">##</span> <span class="token expression">f <span class="token punctuation">&#125;</span><span class="token punctuation">,</span></span></span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">else</span></span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">define</span> <span class="token macro-name function">DEF</span><span class="token expression"><span class="token punctuation">(</span>id<span class="token punctuation">,</span> size<span class="token punctuation">,</span> n_pop<span class="token punctuation">,</span> n_push<span class="token punctuation">,</span> f<span class="token punctuation">)</span> <span class="token punctuation">&#123;</span> size<span class="token punctuation">,</span> n_pop<span class="token punctuation">,</span> n_push<span class="token punctuation">,</span> OP_FMT_ </span><span class="token punctuation">##</span> <span class="token expression">f <span class="token punctuation">&#125;</span><span class="token punctuation">,</span></span></span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">endif</span></span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">include</span> <span class="token string">"quickjs-opcode.h"</span></span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">undef</span> <span class="token expression">DEF</span></span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">undef</span> <span class="token expression">FMT</span></span>
<span class="token punctuation">&#125;</span><span class="token punctuation">;</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<p>程序的开始，定义了一个JSOpCode结构体，每个操作码使用JSOpCode表示。这个结构体中，定义了操作码名称、操作码加其后面操作数总长度（单位是byte，如：如果是5，则表示操作码加操作数总共是5bytpe，代码执行时根据这个来做PC偏移的）、该操作码执行时会出栈或入栈多少个项（根据其操作数的个数决定）以及其操作对象的格式。<br>当QuickJS被编译器编译时，首先会对其源码进行预编译。在预编译过程中，根据宏定义，将会完成对opcode_info的定义。预编译之后，opcode_info将会变成下面代码：</p>
<pre class="line-numbers language-c" data-language="c"><code class="language-c"><span class="token keyword">static</span> <span class="token keyword">const</span> JSOpCode opcode_info<span class="token punctuation">[</span>OP_COUNT <span class="token operator">+</span> <span class="token punctuation">(</span>OP_TEMP_END <span class="token operator">-</span> OP_TEMP_START<span class="token punctuation">)</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token punctuation">&#123;</span>
    <span class="token punctuation">&#123;</span><span class="token string">"invalid"</span><span class="token punctuation">,</span><span class="token number">1</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>OP_FMT_none<span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
    <span class="token punctuation">&#123;</span><span class="token string">"push_i32"</span><span class="token punctuation">,</span><span class="token number">5</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">1</span><span class="token punctuation">,</span>OP_FMT_i32<span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
    ······
    <span class="token punctuation">&#123;</span><span class="token string">"typeof_is_function"</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> OP_FMT_none<span class="token punctuation">&#125;</span>
<span class="token punctuation">&#125;</span><span class="token punctuation">;</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<p>那么为什么是这样的呢？<br>解释前，先复习下宏定义。宏定义的存活于编译的预处理中。 宏定义中有两个运算符：#和##。#运算符将一个宏的参数转换为字符串字面量。##运算符可以将两个记号（例如标识符）“粘”在一起，成为一个记号。（##运算符被称为“记号粘合”）。举个例子：</p>
<pre class="line-numbers language-c" data-language="c"><code class="language-c"><span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">define</span> <span class="token macro-name function">STR</span><span class="token expression"><span class="token punctuation">(</span>s<span class="token punctuation">)</span> #s</span></span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">define</span> <span class="token macro-name function">CONS</span><span class="token expression"><span class="token punctuation">(</span>a<span class="token punctuation">,</span>b<span class="token punctuation">)</span> <span class="token keyword">int</span><span class="token punctuation">(</span>a</span><span class="token punctuation">##</span><span class="token expression">e</span><span class="token punctuation">##</span><span class="token expression">b<span class="token punctuation">)</span></span></span>
<span class="token keyword">int</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">&#123;</span>
    <span class="token function">printf</span><span class="token punctuation">(</span><span class="token function">STR</span><span class="token punctuation">(</span>vck<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token function">printf</span><span class="token punctuation">(</span><span class="token string">"%d/n"</span><span class="token punctuation">,</span> <span class="token function">CONS</span><span class="token punctuation">(</span><span class="token number">2</span><span class="token punctuation">,</span><span class="token number">3</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">return</span> <span class="token number">0</span><span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<p>以上代码预处理之后，将会变成这样</p>
<pre class="line-numbers language-c" data-language="c"><code class="language-c"><span class="token keyword">int</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">&#123;</span>
    <span class="token function">printf</span><span class="token punctuation">(</span><span class="token string">"vck"</span><span class="token punctuation">)</span><span class="token punctuation">;</span> 
    <span class="token function">printf</span><span class="token punctuation">(</span><span class="token string">"%d/n"</span><span class="token punctuation">,</span> <span class="token number">2e3</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">return</span> <span class="token number">0</span><span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<p>我们可以看到，STR宏定义的作用，就是将其参数转换成字符串字面量；而CONS宏定义的作用就是将其参数连接起来。<br>回到opcode_info的定义上来。首先，先定义了它作为一个数组。数组的长度是：OP_COUNT + (OP_TEMP_END - OP_TEMP_START) 。然后就是数组的定义。首先定义FMT(f)为空，然后根据是否定义了DUMP_BYTECODE来对DEF进行不同的定义。DEF的这两个不同定义的区别是：是否存在name这个字段。两种定义摘出来如下</p>
<pre class="line-numbers language-c" data-language="c"><code class="language-c"><span class="token comment">//第一种</span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">define</span> <span class="token macro-name function">DEF</span><span class="token expression"><span class="token punctuation">(</span>id<span class="token punctuation">,</span> size<span class="token punctuation">,</span> n_pop<span class="token punctuation">,</span> n_push<span class="token punctuation">,</span> f<span class="token punctuation">)</span> <span class="token punctuation">&#123;</span> #id<span class="token punctuation">,</span> size<span class="token punctuation">,</span> n_pop<span class="token punctuation">,</span> n_push<span class="token punctuation">,</span> OP_FMT_ </span><span class="token punctuation">##</span> <span class="token expression">f <span class="token punctuation">&#125;</span><span class="token punctuation">,</span></span></span>
<span class="token comment">//第二种</span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">define</span> <span class="token macro-name function">DEF</span><span class="token expression"><span class="token punctuation">(</span>id<span class="token punctuation">,</span> size<span class="token punctuation">,</span> n_pop<span class="token punctuation">,</span> n_push<span class="token punctuation">,</span> f<span class="token punctuation">)</span> <span class="token punctuation">&#123;</span> size<span class="token punctuation">,</span> n_pop<span class="token punctuation">,</span> n_push<span class="token punctuation">,</span> OP_FMT_ </span><span class="token punctuation">##</span> <span class="token expression">f <span class="token punctuation">&#125;</span><span class="token punctuation">,</span></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span></span></code></pre>

<p>这两个宏定义可以看出来，都是定义一个结构体。这个结构体，就是我们文章一开始说的操作码–JSOpCode。<br>接下来，通过 #include “quickjs-opcode.h” 引入了操作码定义文件。在这里，为了便于解释，我们选择DEF的第一种宏定义来进行解释。<br>在操作码定义头文件中，首先是使用FMT来定义一些操作数格式。当然，在这个场景中，我们的FMT定义为空，因此，FMT定义的所有语句都是无效的，不会生成代码。<br>接下来是使用DEF定义了一些语句。根据它的宏定义含义，那么第一行定义（如下：）</p>
<pre class="line-numbers language-c" data-language="c"><code class="language-c"><span class="token function">DEF</span><span class="token punctuation">(</span>invalid<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> none<span class="token punctuation">)</span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>

<p>将会生成如下代码：</p>
<pre class="line-numbers language-c" data-language="c"><code class="language-c"><span class="token punctuation">&#123;</span><span class="token string">"invalid"</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> OP_FMT_none<span class="token punctuation">&#125;</span><span class="token punctuation">,</span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>

<p>同样，第二行代码(如下：)</p>
<pre class="line-numbers language-c" data-language="c"><code class="language-c"><span class="token function">DEF</span><span class="token punctuation">(</span>       push_i32<span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> i32<span class="token punctuation">)</span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>

<p>会生成如下代码：</p>
<pre class="line-numbers language-c" data-language="c"><code class="language-c"><span class="token punctuation">&#123;</span><span class="token string">"push_i32"</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> OP_FMT_i32<span class="token punctuation">&#125;</span>，<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>

<p>同样，以此类推，预编译之后最终将会生成如下的代码</p>
<pre class="line-numbers language-c" data-language="c"><code class="language-c"><span class="token keyword">static</span> <span class="token keyword">const</span> JSOpCode opcode_info<span class="token punctuation">[</span>OP_COUNT <span class="token operator">+</span> <span class="token punctuation">(</span>OP_TEMP_END <span class="token operator">-</span> OP_TEMP_START<span class="token punctuation">)</span><span class="token punctuation">]</span> <span class="token operator">=</span> 
<span class="token punctuation">&#123;</span>
    <span class="token punctuation">&#123;</span><span class="token string">"invalid"</span><span class="token punctuation">,</span><span class="token number">1</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>OP_FMT_none<span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
    <span class="token punctuation">&#123;</span><span class="token string">"push_i32"</span><span class="token punctuation">,</span><span class="token number">5</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">1</span><span class="token punctuation">,</span>OP_FMT_i32<span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
    ······
    <span class="token punctuation">&#123;</span><span class="token string">"typeof_is_function"</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> OP_FMT_none<span class="token punctuation">&#125;</span>
<span class="token punctuation">&#125;</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<h2 id="操作数格式"><a href="#操作数格式" class="headerlink" title="操作数格式"></a>操作数格式</h2><p>在操作码中，定义了fmt字段。该字段的含义是标明操作码操作的操作数是什么格式。比如：如果是32bit的整数，则其值为OP_FMT_i32。OP_FMT_i32是怎么来的呢？也是通过宏定义生成的。它是一个枚举类型。定义代码如下：</p>
<pre class="line-numbers language-c" data-language="c"><code class="language-c"><span class="token comment">//定义opcodeFormat枚举，例如：OP_FMT_none  OP_FMT_none_int OP_FMT_none_loc</span>
<span class="token keyword">typedef</span> <span class="token keyword">enum</span> <span class="token class-name">OPCodeFormat</span> <span class="token punctuation">&#123;</span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">define</span> <span class="token macro-name function">FMT</span><span class="token expression"><span class="token punctuation">(</span>f<span class="token punctuation">)</span> OP_FMT_ </span><span class="token punctuation">##</span> <span class="token expression">f<span class="token punctuation">,</span></span></span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">define</span> <span class="token macro-name function">DEF</span><span class="token expression"><span class="token punctuation">(</span>id<span class="token punctuation">,</span> size<span class="token punctuation">,</span> n_pop<span class="token punctuation">,</span> n_push<span class="token punctuation">,</span> f<span class="token punctuation">)</span></span></span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">include</span> <span class="token string">"quickjs-opcode.h"</span></span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">undef</span> <span class="token expression">DEF</span></span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">undef</span> <span class="token expression">FMT</span></span>
<span class="token punctuation">&#125;</span> OPCodeFormat<span class="token punctuation">;</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<p>在这个枚举定义中，我们首先定义了FMT的定义，其定义为</p>
<pre class="line-numbers language-c" data-language="c"><code class="language-c"><span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">define</span> <span class="token macro-name function">FMT</span><span class="token expression"><span class="token punctuation">(</span>f<span class="token punctuation">)</span> OP_FMT_ </span><span class="token punctuation">##</span> <span class="token expression">f<span class="token punctuation">,</span></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>

<p>接下来，这次与上面操作码的定义不同，定义DEF为空。<br>#define DEF(id, size, n_pop, n_push, f)</p>
<p>同样，通过引入 #include “quickjs-opcode.h” 头文件来定义操作数格式。这次，我们就不仔细解释了。预处理之后的代码如下：</p>
<pre class="line-numbers language-c" data-language="c"><code class="language-c"><span class="token keyword">typedef</span> <span class="token keyword">enum</span> <span class="token class-name">OPCodeFormat</span> <span class="token punctuation">&#123;</span>
    OP_FMT_none<span class="token punctuation">,</span>
    OP_FMT_none_int<span class="token punctuation">,</span>
    <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
    OP_FMT_i32<span class="token punctuation">,</span>
    <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
    OP_FMT_label_u16
<span class="token punctuation">&#125;</span> OPCodeFormat<span class="token punctuation">;</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<h2 id="操作码的种类"><a href="#操作码的种类" class="headerlink" title="操作码的种类"></a>操作码的种类</h2><p>操作码决定了”CPU“做何种操作。我们可以将这些操作码分成如下几类：</p>
<h3 id="变量操作相关指令"><a href="#变量操作相关指令" class="headerlink" title="变量操作相关指令"></a>变量操作相关指令</h3><ul>
<li>define_var, define_func,  define_class, define_field, define_method… </li>
<li>(get | put | set)_(loc | arg | var_ref | var | field | array_el…) <h3 id="调用相关指令"><a href="#调用相关指令" class="headerlink" title="调用相关指令"></a>调用相关指令</h3></li>
<li>call, tail_call, call_method, tail_call_method, return… <h3 id="跳转相关指令"><a href="#跳转相关指令" class="headerlink" title="跳转相关指令"></a>跳转相关指令</h3></li>
<li>goto, if_false, if_true, label… <h3 id="指令变换相关指令"><a href="#指令变换相关指令" class="headerlink" title="指令变换相关指令"></a>指令变换相关指令</h3></li>
<li>drop, nip, dup, insert, perm, swap, rot… <h3 id="数据相关指令"><a href="#数据相关指令" class="headerlink" title="数据相关指令"></a>数据相关指令</h3></li>
<li>push, object, array_from…</li>
</ul>
<blockquote>
<p><strong>欢迎转载，请注明出处</strong></p>
</blockquote>
 

<div class="p-2 pe-4">
     
        <a href="/2022/05/05/QuickJS%E5%AD%97%E8%8A%82%E7%A0%81%E6%89%93%E5%8D%B0/" class="btn btn-outline-secondary btn-sm float-start">
            <small>
                < 上一篇：QuickJS字节码打印
            </small>
        </a>
     
     
</div>
                        </div>
                    </div>

                    <!-- sidebar -->
                    <div id="slidebar">
                        <div class="border-auto ps-2 pe-1 pb-2 pt-2">
    
        <!-- 侧边栏 分类 -->
<div class="card mb-3">
    <h6 class="card-header tag-hover"><i class="fa fa-folder-open pe-2"></i>分类
        
    </h6>
    <div class="card-body">
        <ul class="list-group border-0">
            
            
             
            <a class="list-group-item border-0 pt-0 pb-0 ps-1" href="/categories/QuickJS/ ">
                QuickJS <span class="badge bg-secondary float-end m-1">3</span>
            </a>
              
        </ul>

        <ul class="list-group border-0 collapse" id="category">
            
        </ul>
    </div>
</div>

 
    
        <!-- 侧边栏 标签 -->
<div class="card mb-3">
    <h6 class="card-header tag-hover"><i class="fa fa-tag pe-2"></i>标签
        
    </h6>

    <div class="card-body tag-hover">
        
        
             
            <a class="text-decoration-none border-0 d-inline-flex link-dark pt-0 pb-0 p-0" href="/tags/QuickJS/ ">
                QuickJS <span class="badge bg-secondary float-end m-1">6</span>
            </a>
          

        <span id="tags" class="collapse">
            
        </span>
    </div>
</div>
 
    
        <div class="card mb-3">
    <h6 class="card-header"><i class="fa fa-clock-o pe-2"></i>最近文章</h6>
    <div class="card-body tag-hover">
        <ul class="list-group border-0">
            
            
                <a class="list-group-item border-0 pt-0 pb-0 ps-1 fs-6" style="margin-bottom: 10px;" href="/2022/05/05/QuickJS-JSString-JSAtom/ ">
                    <small> QuickJS JSString&JSAtom </small>
                </a>
            
            
                <a class="list-group-item border-0 pt-0 pb-0 ps-1 fs-6" style="margin-bottom: 10px;" href="/2022/05/05/QuickJS%E5%AD%97%E8%8A%82%E7%A0%81%E6%89%93%E5%8D%B0/ ">
                    <small> QuickJS字节码打印 </small>
                </a>
            
            
                <a class="list-group-item border-0 pt-0 pb-0 ps-1 fs-6" style="margin-bottom: 10px;" href="/2022/05/05/QuickJS%E6%93%8D%E4%BD%9C%E7%A0%81/ ">
                    <small> QuickJS操作码 </small>
                </a>
            
            
                <a class="list-group-item border-0 pt-0 pb-0 ps-1 fs-6" style="margin-bottom: 10px;" href="/2022/05/12/QuickJS%E6%95%B0%E5%AD%97%E5%AD%97%E9%9D%A2%E9%87%8F/ ">
                    <small> QuickJS数字字面量 </small>
                </a>
            
            
                <a class="list-group-item border-0 pt-0 pb-0 ps-1 fs-6" style="margin-bottom: 10px;" href="/2022/05/16/QuickJS-JavaScript%E4%B8%96%E7%95%8C%E7%9A%84%E5%8E%9F%E5%A7%8B%E5%8E%9F%E5%9E%8B%E5%AF%B9%E8%B1%A1%E7%9A%84%E5%BB%BA%E7%AB%8B/ ">
                    <small> QuickJS JavaScript世界的原始原型对象的建立 </small>
                </a>
            
             
        </ul>
    </div>
</div> 
    
        <div class="card mb-3">
    <h6 class="card-header"><i class="fa fa-link pe-2"></i>友情链接</h6>
    <div class="card-body tag-hover">
        <ul class="list-group border-0">
            
                <a class="list-group-item border-0 pt-0 pb-0 ps-1 fs-6 text" target="_blank" rel="noopener" href="https://blog.csdn.net/jayyuz ">
                    <small>CSDN</small>
                </a>
            
                <a class="list-group-item border-0 pt-0 pb-0 ps-1 fs-6 text" target="_blank" rel="noopener" href="https://smartlink.xin ">
                    <small>Smartlink</small>
                </a>
             
        </ul>
    </div>
</div> 
    
</div>
                    </div>
                </div>
            </main>


            <!-- footer -->
            <footer id="footer" class="bg-dark pt-3 pb-0 mt-5">
    <div class="container pb-4 pt-4 text-center">
        <p class="text-muted tag-hover"> Copyright © 2022 <a class="link-secondary text-decoration-none" target="_blank" rel="noopener" href="https://hexo.io"> SmartLink </a><br> <a class="link-secondary text-decoration-none" target="_blank" rel="noopener" href="https://github.com/smile-yan/hexo-theme-heyan"> Hexo </a> Theme <a class="link-secondary text-decoration-none" target="_blank" rel="noopener" href="https://github.com/smile-yan/hexo-theme-heyan"> heyan </a> 
            <br>
            <a class="link-secondary text-decoration-none" target="_blank" rel="noopener" href="https://beian.miit.gov.cn/#/Integrated/index">
                 
            </a>
        </p>
    </div>
</footer>
    <!-- hexo injector body_end start -->
<script src="/assets/prism-bundle.js"></script>
<script src="/assets/prism-plus.js" data-pjax=""></script>
<!-- hexo injector body_end end --><!-- hexo-inject:begin --><!-- hexo-inject:end --></body>
    <script>
        // 获取屏幕高度 document.documentElement.clientHeight
        console.log(document.documentElement.clientHeight);
        // 获取屏幕宽度 document.documentElement.clientWidth
        console.log(document.documentElement.clientWidth);
        if (document.documentElement.clientHeight > document.documentElement.clientWidth) {
            console.log('remove slidebar')
            document.getElementById("slidebar").remove()
            document.getElementById("content").className = "col-md-12";//单个class  
        } else {
            document.getElementById("slidebar").className = "col-md-2";//单个class  
            document.getElementById("content").className = "col-md-10";//单个class  
        }
    </script>
    <!-- https://cdn.jsdelivr.net/npm/vanta@0.5.22/dist/vanta.birds.min.js -->
    <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r121/three.min.js"></script> -->
    <!-- <script src="https://cdn.jsdelivr.net/npm/vanta@0.5.22/dist/vanta.dots.min.js"></script>
    <script>
        VANTA.DOTS({
            el: "#footer",
            mouseControls: true,
            touchControls: true,
            gyroControls: false,
            minHeight: 200.00,
            minWidth: 200.00,
            scale: 1.00,
            scaleMobile: 1.00,
            size: 2.20,
            spacing: 13.00
        })
    </script> -->

    <!-- <script src="https://cdn.jsdelivr.net/npm/vanta@0.5.22/dist/vanta.clouds2.min.js"></script>
    <script>
        VANTA.CLOUDS2({
            el: "#footer",
            mouseControls: true,
            touchControls: true,
            gyroControls: false,
            minHeight: 200.00,
            minWidth: 200.00,
            scale: 1.00,
            speed: 2.10,
            texturePath: "https://www.vantajs.com/gallery/noise.png"
        })
    </script> -->

</html>